home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11140 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  834 b 

  1. Path: oclc.org!not-for-mail
  2. From: razin@oclc.org (Irina Razin)
  3. Organization: OCLC Online Computer Library Center, Inc.
  4. NNTP-Posting-Host: fssun10-30.dev.oclc.org
  5. Distribution: world
  6. Message-ID: <4h3396$l4f@oclc.org>
  7. Date: Wed, 13 Mar 1996 16:43:16 GMT
  8. Subject: class for accessing indiv bits
  9. Newsgroups: comp.lang.c++
  10.  
  11. I was thinking about writing a class for simulating array
  12. of bits, where each member of that array can serve as a
  13. binary variable, so for example, by allocating just two
  14. long integers I would have an array of sizeof(long)*8 
  15. elements.
  16.  
  17. Having such a class would be a lot of fun. Anybody have it
  18. implemented already? I have written basic functions for 
  19. retrieving, setting and toggling bits, but they are very
  20. C-style. How about overloaded [],=, copy constructors etc
  21. so it looks just like a regular data type?
  22.  
  23. Ira
  24.